﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Biz/MiniTop.Master" AutoEventWireup="true" CodeBehind="Stat.aspx.cs" Inherits="Cn.Cellula.MiniTopSite.Biz.Stat" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link type="text/css" rel="Stylesheet" href="/Cellula_Client/module/stat/style/StatMain.css" />
    <script type="text/javascript" src="/cellula_client/module/stat/scripts/FusionCharts.js"></script>
    <script type="text/javascript" src="/cellula_client/module/stat/scripts/StatBiz.js"></script>
    <script type="text/javascript">
        jDateSelector.setMode("m");
        var jStatBiz = new StatBiz("jStatBiz");
        jStatBiz.setChartPlayerId("ChartPlayer");
        jStatBiz.setChartFileName("Pie3D");
        jStatBiz.setStatKey("dab46f85370b483f9de8c8dfcdbfc4ce");
        jStatBiz.setFormBoxId("stat_FormBox");
        jStatBiz.setGridBoxId("stat_GridBox");
        jStatBiz.setChartId("myChartId");
        jStatBiz.setRequestHandler("Ws/_Stat.aspx");
        jStatBiz.setChartWidth("300");
        jStatBiz.setChartHeight("200");
        function onDateChanged(rDtStr) {
            jBiz.updateDatetime(rDtStr+"-1");
            var _dt = jskitUtil.date.parse(rDtStr + "-1");
            if (_dt != null) {
                jStatBiz.setParams([{ key: "txt_user", value: gCurrentOperatorId }
                        , { key: "txt_startdt", value: jskitCalendar.getFirstTimeOfMonth(_dt.getYear(), _dt.getMonth() + 1) }
                        , { key: "txt_enddt", value: jskitCalendar.getLastTimeOfMonth(_dt.getYear(), _dt.getMonth() + 1) }
                        ]);
                jStatBiz.reLoad();
            }
        }
        function PageOnLoad() {
            jBiz.setDatePanel("date_panel");
            jBiz.deploy("listbox");
            var _curDt = new Date();
            jStatBiz.setParams([{ key: "txt_user", value: gCurrentOperatorId }
                        , { key: "txt_startdt", value: jskitCalendar.getFirstTimeOfMonth(_curDt.getYear(), _curDt.getMonth() + 1) }
                        , { key: "txt_enddt", value: jskitCalendar.getLastTimeOfMonth(_curDt.getYear(), _curDt.getMonth() + 1) }
                        ]);
            _curDt = null;
            jStatBiz.onPageLoad();
        }    
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_Body" runat="server">
<div class="list">
    <div id="listbox" class="stat_box">
        <div id="stat_GridBox" class="grid_box"></div>
        <div id="ChartPlayer" clsss="chart_box"></div>
    </div>
</div>
</asp:Content>
